<template>
	<view>
		<fa-navbar title="技能培训详情"></fa-navbar>
		<view class="content">
			<view class="video-play">
				<u-image height="395" width="702" :src="classesDetail.image" radius="20"></u-image>
			</view>
			<view >
				<view class="detail">
					<view class="detail1">
						<text class="name">{{classesDetail.name}}</text>
					</view>
					<view class="d-content">
						<view class="c-left">
							<u-icon name="clock" size="32" color="#999999"></u-icon>
							<text>开班时间 {{classesDetail.starttime_text}} 至 {{classesDetail.endtime_text}}</text>
						</view>
						<view class="c-left">
							<u-icon name="clock" size="32" color="#999999"></u-icon>
							<text>报名时间 {{classesDetail.regstarttime_text}} 至 {{classesDetail.regendtime_text}}</text>
						</view>
						<view class="c-right">
							<u-icon name="account" color="#999999" size="32"></u-icon>
							<text class="like">555人已报名</text>
						</view>
					</view>
				</view>
				<view class="c-intro">
					<u-parse :content="classesDetail.regcontent" :tagStyle="vuex_parse_style"
						:domain="vuex_config.upload ? vuex_config.upload.cdnurl : ''" @linkTap="navigate"></u-parse>
				</view>
			</view>
		</view>
		<view class="pl-btn">
			<u-button :plain="true" :hairline="true" shape="circle" text="退役军人报名入口" 
			:customStyle="{'border':'3rpx solid #0052D9','height':'88rpx','line-height':'88rpx','margin-right':'32rpx','color':'#0052D9','font-size':'30rpx'}"
			@click="tyjrSignup"></u-button>
			<u-button  text="立即报名" shape="circle"
			:customStyle="{'border':'3rpx solid #0052D9','height':'88rpx','line-height':'88rpx','background':'#0052D9','color':'#ffffff','font-size':'30rpx'}"
			@click="otherSignup"></u-button>
			
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				classesDetail: [],
				
				activeIndex: 0,
				classesId: 0,
				chapterList: [],
				commentList: [],
				scrollTop: 0,
				old: {
					scrollTop: 0
				},

			};
		},
		onLoad(e) {
			this.classesId = e.classes_id
		},
		onShow() {
			this.getClassesDetail()
		},
		methods: {
			
			click() {},
			//详情
			getClassesDetail() {
				this.$api.getClassesDetail({
					params: {
						classes_id: this.classesId
					}
				}).then((res) => {
					if (res.code) {
						this.classesDetail = res.data;
					} else {
						uni.$u.toast(res.msg);
					}
				})
			},
			tyjrSignup(){
				uni.$u.route({
					url: '/pages/training/jrsignup',
				})
				return
			},
			otherSignup(){
				uni.$u.route({
					url: '/pages/training/signup',
					params:{
						classes_id:this.classesId
					}
				})
				return
			}
			
		}

	}
</script>

<style lang="scss" scoped>
	.content {
		background-color: #F3F5F8;
		padding: 208rpx 24rpx 0rpx;
	}

	.video-play {
		width: 100%;
		height: 395rpx;
		border-radius: 20rpx;
		margin-bottom:24rpx;
		.video {
			width: 100%;
			height: 100%;
			border-radius: 20rpx;
		}
	}

	.ft30 {
		font-size: 30rpx;
	}

	.ft28 {
		font-size: 28rpx;
	}

	.fw6 {
		font-weight: 600;
	}

	.tabs {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 32rpx 57rpx;

		.it {
			text-align: center;

		}

		/deep/ .u-line {
			border-bottom-width: 10rpx !important;
			margin: 20rpx auto !important;
		}
	}


	.detail {
		background-color: #ffffff;
		padding: 34rpx 24rpx;
		border-radius: 20rpx;

		.detail1 {
			padding: 24rpx 0;

			.major {
				background-color: #FF6905;
				border-radius: 10rpx;
				color: #ffffff;
				font-size: 24rpx;
				padding: 4rpx 8rpx;
				margin-right: 16rpx;
			}

			.name {
				font-size: 32rpx;
				color: #000000;
				font-weight: 600;
			}
		}
	}

	.d-content {
		// display: flex;
		// align-items: center;
		// justify-content: space-between;

		.c-left {
			display: flex;
			align-items: center;
			margin-bottom: 16rpx;
			text {
				margin-left: 10rpx;
				font-size: 24rpx;
				color: #999999;
			}
		}

		.c-right {
			display: flex;
			align-items: center;

			.like {
				margin-left: 10rpx;
				color: #666666;
				font-size: 24rpx;
			}
		}
	}

	.c-intro {
		margin-top: 24rpx;
		background-color: #ffffff;
		border-radius: 20rpx;
		padding: 32rpx 28rpx;
	}

	.chapter {
		background-color: #ffffff;
		border-radius: 20rpx;
		padding: 24rpx;
	}

	.comment {
		background-color: #ffffff;
		border-radius: 20rpx;
		padding: 24rpx;
		.scy{
			height: 770rpx;
			overflow: hidden;
			padding-bottom: calc(24rpx + constant(safe-area-inset-bottom));
			padding-bottom: calc(24rpx + env(safe-area-inset-bottom));
		}
		.scroll-Y{
			height: 100%;
		}
		.items {
			padding: 16rpx 8rpx;
			display: flex;

			.c-left {
				margin-right: 24rpx;
			}

			.c-right {
				width: 100%;

				.rnc {
					display: flex;
					align-items: center;
					justify-content: space-between;

					text {
						color: #666666;
						font-size: 28rpx;
					}

					.sj {
						font-size: 24rpx !important;
					}
				}

				.plnr {
					margin-top: 16rpx;
					color: #333333;
					font-size: 28rpx;
				}
			}
		}
	}
	
	.pl-btn{
		display: flex;
		position: absolute;
		bottom: 0;
		left: 0;
		right: 0;
		padding: 20rpx;
		background-color: #ffffff;
		padding-bottom: calc(24rpx + constant(safe-area-inset-bottom));
		padding-bottom: calc(24rpx + env(safe-area-inset-bottom));
	}
</style>